import { BaseViewModel, BasePageInfo } from '@ohos/lib_common'
import { API } from '../../../common/constants/api'
import { IForumItem } from '../../common/forumItem/interface'

// 附件信息数据
interface NearbyForumData extends BasePageInfo {
  records: IForumItem[]
}

// 请求数据
export class NearbyForumDataModal extends BaseViewModel {
  async getNearbyForumData() {
    const res = await this.get<NearbyForumData>({ url: API.NEARBY_FORUM })
    return res;
  }
}

export const nearbyForumDataModal = new NearbyForumDataModal()